package com.xuecheng.web.exceptions;

import com.xuecheng.commons.enums.ErrorCode;
import lombok.Data;

/**
 * @author Keson
 * @version 1.0.0
 * @title BusinessException
 * @description <TODO description class purpose>
 * @create 2022/7/14 16:32
 */
@Data
public class BusinessException extends RuntimeException {
    //错误枚举信息
    private ErrorCode errorCode;

    public BusinessException(ErrorCode errorCode) {
        super(errorCode.getDesc());
        this.errorCode = errorCode;
    }

}
